package com.lml.jdk8.test04;

/**
 * @author Administrator
 * @date 2020/2/26 23:00
 * Description:
 */
public class Student {

    private String name;
    private int age;

    public Student() {
        System.out.println("调用空构造器");
    }

    public Student(int age) {
        System.out.println("调用有参构造器");
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
